<%@ page language="java" import="java.util.*, org.apache.hadoop.fs.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!-- 标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!-- 前台 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>海康云盘系统</title>

    <link rel="stylesheet" href="css/poposlides.css">
    <link rel="stylesheet" href="css/layout.css">
    <script src="js/jquery-2.1.4.min.js"></script>
    <style>
       

        #td-operator a{
            background-color: transparent; border: 1px solid #28B2FC;
            color: #28B2FC;font-weight: 900; font-size:13px; padding: 3px 10px;
            border-radius: 5px;margin-right:8px ;
            display:inline-block;
        }
        
        #td-operator img{
                width:18px;
        }
        
    </style>
    <script src="js/jquery-2.1.4.min.js" ></script>
    
    <script>

     
       function initTrEvent(){
            $("#center_table tr").mouseover(
                function(){
                    $(this).siblings().removeClass("highlightTd");
                    $(this).addClass("highlightTd");

            });  
     }

     $(function(){
           initTrEvent();
      });
     
      //删除文件
     function delFile(fileName){
         if(confirm('确定要删除吗')==true){
              window.location.href=" HiveServlet?flag=delete&fileName=" +encodeURI(fileName);
         }   
    }

     
    </script>  
  </head>
      
  <body>

   
   <div class="frame-center">
        
            <div class="frame-title">
               <span>   
                    <a > HIVE-日志分析</a>
                </span>
                <span>
                      已全部加载，共  <label>${fn:length(hdfsFileList)} </label>个
                </span>
              
            </div>
           
            <div class="tab">
                <table>  
                    <tr>
                        <td id="td-operator"> 
                            <a href="javascript:$('#img1').show(); window.location.href='Hive_LogTableServlet' "><img src="images/upload.png"  />查看表格</a>
                            <a href="Hive/log-group-result.jsp"><img src="images/download.png"/>访问量排序</a>
                            <a href="javascript:$('#img1').show(); window.location.href='Hive_LogTable2Servlet' "><img src="images/upload.png"  />表格展示</a>
                        </td>
                        <td >
   
                         </td>
                        <td>大小</td>
                        <td>修改日期</td>
                    </tr>
              </table>
              
                <img id="img1" style="display:none" src="images/loading.gif" />
                
                
                  <div class="datas">
                    <table id="center_table">   
                        <c:forEach var="f" items="${hdfsFileList}">
                         <tr>
                            <td>
                               &nbsp; <img src="images/fileIcons/${f.icon }">
                                <label> ${f.name }</label>
                             </td>
                              <td >
                                    <a onclick="return delFile('${f.path}')" ><img src="images/c.png"  title="删除"  /></a>
                              </td>
                            <td>${f.len}</td>
                            <td>${f.modifcationTime}</td>
                            </tr>
                        </c:forEach>
                    </table>
                </div>
            </div>
        </div>
  </body>
</html>